package com.design.organization;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;

@Data
public abstract class OrganizationComponent {

    List<OrganizationComponent> organizationComponents=new ArrayList<>();


    private String name;
    private String des;


    public OrganizationComponent(String name, String des) {
        this.name = name;
        this.des = des;
    }

    public void add(OrganizationComponent organizationComponent)throws UnsupportedOperationException{
        organizationComponents.add(organizationComponent);
    }
    public void remove(OrganizationComponent organizationComponent)throws UnsupportedOperationException{
        organizationComponents.remove(organizationComponent);
    }

    protected  abstract void print();




}
